#ifndef CCGISSUPERGRP__H__INTERFACE
#define CCGISSUPERGRP__H__INTERFACE

#include "Vge_MStruct.h"

namespace ccgis{

class AFX_EXT_CLASS CcgisSuperGroup {
public:
	STATUS SGrpGetFeaNameByUsrId( char UsrId[MAX_CODE],CStringArray &feanames);
	STATUS SGrpGetUsrIdByFeaName( char feaname[MAX_NAME],CString &UsrId);
	STATUS SGrpGetAllFeaName( CStringArray &feanames );
	STATUS SGrpSetFeaName( int gid,char feaname[MAX_NAME]);
	STATUS SGrpGetFeaName( int gid,char feaname[MAX_NAME]);
	STATUS SGrpRectQuery( float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisSGrpData **&pSGrp,int &len,BOOL bUpdate = FALSE ,BOOL bWait = FALSE );
	STATUS SGrpRectQuery( float minx,float miny,float maxx,float maxy,CcgisSGrpData **&pSGrp,int &len,BOOL bUpdate = FALSE ,BOOL bWait = FALSE );
	STATUS SGrpRectQueryIds( float minx,float miny,float maxx,float maxy,CStringArray &codes,CcgisIds &ids,BOOL bUpdate = FALSE ,BOOL bWait = FALSE );
	STATUS SGrpPtQuery( float ptx, float pty, float torlerance, CStringArray &codes, CcgisIds &gids );
	STATUS SGrpLineQuery( _ccgisPoint2D *linePts, int len, CStringArray &codes, CcgisIds &gids );
	STATUS SGrpPolygonQuery( _ccgisPoint2D *polyPts, int len, CStringArray &codes, CcgisIds &gids, int queryType = 1 );//1: QT_CONTAIN 2: QT_INTERSECT
	STATUS SGrpPolygonQuery(_ccgisPoint2D *polyPts, int len, CcgisIds &gids, int queryType = 1 );
	STATUS SGrpLineQuery(_ccgisPoint2D *linePts, int len, CcgisIds &gids);
	STATUS SGrpPtQuery(float ptx, float pty, float torlerance, CcgisIds &gids);
	STATUS SGrpGetAllCode(CStringArray &allcodes);
	STATUS SGrpSetNewGID(OIDTYPE oldGid, OIDTYPE newGid);
	STATUS SGrpSetVisFlag(OIDTYPE gid, char visFlag);
	STATUS SGrpGetVisFlag(OIDTYPE gid, char &visFlag, BOOL bUpdate = FALSE, BOOL bWait = FALSE);
	STATUS SGrpUpdateARec(CcgisSGrpData grpdata);
	STATUS SGrpGet2DBox(OIDTYPE gid, CcgisBOX2D &box, BOOL bUpdate = FALSE, BOOL bWait = FALSE);
	STATUS SGrpRectQueryIds(float minx, float miny, float maxx, float maxy, CcgisIds &ids, BOOL bUpdate = FALSE, BOOL bWait = FALSE);
	STATUS SGrpSetCode(OIDTYPE gid, char code[MAX_CODE]);
	STATUS SGrpGetAGrp(OIDTYPE gid, CcgisSGrpData &grpdata, BOOL bUpdate = FALSE, BOOL bWait = FALSE);
	STATUS SGrpGetGrpFrmInfo(OIDTYPE infid, CcgisIds ids, BOOL bUpdate = FALSE, BOOL bWait = FALSE);
	STATUS SGrpQuerySmCode( char gcode[MAX_CODE], CcgisIds &ids, BOOL bUpdate = FALSE, BOOL bWait = FALSE );
	STATUS SGrpSetInfoId(OIDTYPE gid, OIDTYPE infid);
	STATUS SGrpInsertAGroup(CcgisSGrpData grpdata);
	STATUS SGrpGet3DBox( OIDTYPE gid,CcgisENVELOPE3D &box,BOOL bUpdate = FALSE,BOOL bWait = FALSE);
	STATUS SGrpGetCode( OIDTYPE gid,char code[MAX_CODE],BOOL bUpdate = FALSE,BOOL bWait = FALSE);
	STATUS SGrpGetInfoId(OIDTYPE gid,OIDTYPE &infid,BOOL bUpdate = FALSE,BOOL bWait = FALSE);
	STATUS SGrpDelARec(OIDTYPE gid);
	STATUS SGrpClrTab();
	STATUS SGrpGetMaxId(OIDTYPE &oid);
};

}

#endif //CCGISSUPERGRP__H__INTERFACE